package main 
import "fmt"

func main(){
	arr :=[]int{1,9,10,30,2,5,45,8,63,234,12}
	fmt.Println(arr)
	//fmt.Println(GetMax(arr))
	fmt.Println(BubbleSort(arr))
	fmt.Println(arr,"over")
}

func GetMax(arr []int) int {
	for j:=0;j<len(arr);j++ {
		for arr[j] >arr[j+1] {
			arr[j],arr[j+1] =arr[j],arr[j+1]
		}
	}
	return arr[len(arr)-1]
}


func BubbleSort(arr []int) []int {
	for i:=0;i<len(arr);i++ {
		for j:=i+1;j<len(arr);j++ {
			if arr[i]>arr[j] {
				arr[i],arr[j]=arr[j],arr[i]
			}
		}
	}

	return arr
}